import React, { lazy } from "react";
// 引入路由接口
import { RouteListRawState } from "../type";
// 引入外层(layout)框架组件
import MainLayOut from "../components/MainLayOut";
// 引入图标
import { CompassOutlined, RobotOutlined, TabletOutlined,CopyrightOutlined,ClockCircleOutlined,UserOutlined,ForkOutlined,OpenAIOutlined } from '@ant-design/icons';

// 引入页面
const Home = lazy(() => import("../pages/Home"));
const List = lazy(() => import("../pages/List"));
const Kind = lazy(() => import("../pages/Kind"));
const Cart = lazy(() => import("../pages/Cart"));
const Care = lazy(() => import("../pages/Care"));
const Login = lazy(() => import("../pages/Login"));
const Sigin = lazy(() => import("../pages/Sigin"));
const My = lazy(() => import("../pages/My"));

// 隐藏的路由(不展示在侧边导航栏中的)
const Qiye = lazy(() => import("../pages/Qiye"));
const Rengong = lazy(() => import("../pages/Rengong"));
const CreateDesign = lazy(() => import("../pages/CreateDesign"));
const Bangzhu = lazy(() => import("../pages/Bangzhu"));
// 头部菜单里的
const Xiazai = lazy(() => import("../pages/Xiazai"));
const Xianzuo = lazy(() => import("../pages/Xianzuo"));
const Huiyuan = lazy(() => import("../pages/Huiyuan"));
const Qudao = lazy(() => import("../pages/Qudao"));
const Huaban = lazy(() => import("../pages/Huaban"));
const Zhaomu = lazy(() => import("../pages/Zhaomu"));
const Nainiu = lazy(() => import("../pages/Nainiu"));
const Kaifang = lazy(() => import("../pages/Kaifang"));
const Dingzhi = lazy(() => import("../pages/Dingzhi"));

// 定义路由表
export const RouterList: RouteListRawState[] = [
  {
    path: "/",
    element: (
      <MainLayOut>
        <Home></Home>
      </MainLayOut>
    ),
    meta: {
      label: "为你推荐",
      icon:<CompassOutlined />,
      rank: 1,
    },
  },
  {
    path: "/list",
    element: (
      <MainLayOut>
        <List></List>
      </MainLayOut>
    ),
    meta: {
      label: "稿定AI",
      icon:<RobotOutlined />,
      rank: 2,
    },
  },
  {
    path: "/care",
    element: (
      <MainLayOut>
        <Care></Care>
      </MainLayOut>
    ),
    meta: {
      label: "稿定模版",
      icon:<TabletOutlined />,
      rank: 3,
    },
  },
  {
    path: "/kind",
    element: (
      <MainLayOut>
        <Kind></Kind>
      </MainLayOut>
    ),
    meta: {
      label: "素材下载",
      icon:<CopyrightOutlined />,
      rank: 4,
    },
  },
  {
    path: "/user",
    meta: {
      label: "工作台",
      rank: 5,
    },
    children: [
      {
        path: "/user/cart",
        element: (
          <MainLayOut>
            <Cart></Cart>
          </MainLayOut>
        ),
        meta: {
          label: "最近打开",
          icon:<ClockCircleOutlined />,
        },
      },
       {
        path: "/user/my",
        element: (
          <MainLayOut>
            <My></My>
          </MainLayOut>
        ),
        meta: {
          label: "我的空间",
          icon:<UserOutlined />,
        },
      },
    ],
  },
  {
    path: "/login",
    element: <MainLayOut><Login></Login></MainLayOut>,
    meta: {
      label: "AI设计",
      rank:6,
      icon:<ForkOutlined />,
    },
  },
  {
    path: "/sigin",
    element: <MainLayOut><Sigin></Sigin></MainLayOut>,
    meta: {
      label: "图片编辑",
      rank:7,
      icon:<OpenAIOutlined />,
    },
  },
  {
    path: "/qiye",
    element: <Qiye></Qiye>,
    meta: {
      label: "企业",
      hide: true,
    },
  },
  {
    path: "/xiazai",
    element: <Xiazai></Xiazai>,
    meta: {
      label: "下载",
      hide: true,
    },
  },
  {
    path: "/xianzuo",
    element: <Xianzuo></Xianzuo>,
    meta: {
      label: "协作",
      hide: true,
    },
  },
  {
    path: "/huiyuan",
    element: <Huiyuan></Huiyuan>,
    meta: {
      label: "会员",
      hide: true,
    },
  },
  {
    path: "/qudao",
    element: <Qudao></Qudao>,
    meta: {
      label: "渠道代理",
      hide: true,
    },
  },
  {
    path: "/huaban",
    element: <Huaban></Huaban>,
    meta: {
      label: "花瓣",
      hide: true,
    },
  },
  {
    path: "/kaifang",
    element: <Kaifang></Kaifang>,
    meta: {
      label: "开放平台",
      hide: true,
    },
  },
  {
    path: "/nainiu",
    element: <Nainiu></Nainiu>,
    meta: {
      label: "奶牛快传",
      hide: true,
    },
  },
  {
    path: "/dingzhi",
    element: <Dingzhi></Dingzhi>,
    meta: {
      label: "定制设计",
      hide: true,
    },
  },
  {
    path: "/zhaomu",
    element: <Zhaomu></Zhaomu>,
    meta: {
      label: "招募设计师",
      hide: true,
    },
  },
   {
    path: "/rengong",
    element: <Rengong></Rengong>,
    meta: {
      label: "人工客服",
      hide: true,
    },
  },
  {
    path: "/bangzhu",
    element: <Bangzhu></Bangzhu>,
    meta: {
      label: "帮助中心",
      hide: true,
    },
  },
  {
    path:'/createDesign',
    element:<CreateDesign></CreateDesign>,
    meta:{
      label:'创建设计',
      hide:true,
    }
  }
];
